//时间控件
laydate.render({
	elem: '#cjshijian' //指定元素
		,
	type: 'datetime'
});
//确认事件
function queren() {
	let pd = true;
	$('#xfdd .input-group').each(function() {
		if($(this).hasClass("has-error")) {
			pd = false;
			return;
		}
	})
	if(pd) {
		toastr.success("修改成功");
	} else {
		toastr.error("修改失败");
	}
	$("#xfdd").modal("hide");
}
//修改事件
function xiugai() {
	$("#xfdd").modal("show");
	let tds = event.target.parentNode.parentNode.getElementsByTagName("td");
	let tbs = $("#xfdd .form-control");
	for (var i = 0; i < 6; i++) {
		tbs[i].value=tds[i].innerHTML;
	}
	tbs[6].value=tds[6].innerHTML=='已核验'?"yiheyan":"weiheyan";
	tbs[7].value=tds[8].innerHTML;
	tbs[8].value=tds[7].innerHTML;
}
$(function() {
	//输入框监听 事件
	$('#xfdd .form-control').each(function() {
		$(this).on('input porpertychange', function() {
			if($(this).val() == "") {
				this.parentNode.className = 'input-group has-error';
				this.parentNode.getElementsByClassName('glyphicon')[0].className = 'glyphicon form-control-feedback glyphicon-remove';
			} else {
				this.parentNode.className = 'input-group has-success';
				this.parentNode.getElementsByClassName('glyphicon')[0].className = 'glyphicon form-control-feedback glyphicon-ok';
			}
		})
	})
})